'''
Author: @zhyy
Date: 2021-02-07 17:09:25
LastEditors: @zhyy
LastEditTime: 2021-02-07 17:25:35
'''
#coding:utf-8

import time,os,uuid,json,sys
from flask import request, jsonify,session,g,current_app


UP_LOAD='app/static/upload/image'
SAVE_PATH='../static/upload/image'
DIR=os.path.join(os.getcwd(),UP_LOAD)

def upload_img():
    fobject=request.files.get('file')
    img_path=os.path.join(DIR,fobject.filename)
    print(img_path)
    fobject.save(img_path)
    save_path=os.path.join(SAVE_PATH,fobject.filename)
    return jsonify(code=0,msg="上传图片成功",img_path=img_path)


